home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
examples
/
chap04
/
Transparency.wrl
< prev
next >
Wrap
Text File
|
1996-10-14
|
2KB
|
68 lines
#VRML V2.0 utf8
# window which you cannot go through.
Transform{
translation 0 -5 0
children[
Shape{
geometry IndexedFaceSet{
coord Coordinate{
point[
0 0 0, #0
10 0 0, #1
10 10 0, #2
0 10 0, #3
]
}
coordIndex [0, 1, 2, 3, -1]
}
appearance Appearance{
material Material{
diffuseColor 1 0 0
transparency 0.7
}
}
}
]
}
# window which you can go through.
Transform{
translation -10 -5 0
children[
Collision{
collide FALSE
children[
Shape{
geometry IndexedFaceSet{
coord Coordinate{
point[
0 0 0, #0
10 0 0, #1
10 10 0, #2
0 10 0, #3
]
}
coordIndex [0, 1, 2, 3, -1]
}
appearance Appearance{
material Material{
diffuseColor 0 1 0
transparency 0.7
}
}
}
]
}
]
}
# put a car on the other side of the window.
Transform{
translation 0 0 -8
rotation 0 1 0 0.75
children[
Inline{url "CarBody.wrl"}
]
}